********************************************************************************
*
**# Table 8: Does DV Court Reduce Future Criminal Justice Contact for Defendants?
*
********************************************************************************

	* 	Part (1): Impact on ANY CHARGE for DV Cases
	* 	Part (2): Impact on ANY CHARGE for DV Cases vs All Other Cases
	* 	Part (3): Impact on ANY ARREST for DV Cases
	* 	Part (4): Impact on ANY ARREST for DV Cases vs All Other Cases


********************************************************************************
*
**## (1) 
*
********************************************************************************

use "${DATA}/data_DV.dta", clear

# d ; 

eststo clear ;
local m = 1  ;

foreach y of varlist recid_3_dv recid_3_aslt recid_3 recid_3_dvfel { ;

	eststo tab8a_`m': reghdfe `y' dv_judge $cntrls if dv_case == 1, $hdfe_opts ;

		estadd ysumm	;
		local m `++m'	;
} ;


esttab 	tab8a_* using "${OUTPUT}/tab8.rtf", replace ${tab_optns} 
		scalars("ymean Y Mean") 
		keep(dv_judge)
		title( {\b Table 8. Does DV Court Reduce Future Criminal Justice Contact for Defendants? -- Panel A: ANY CHARGE}) ;


# d cr

********************************************************************************
*
**## (2) 
*
********************************************************************************

use "${DATA}/data_DV.dta", clear

# d ; 

eststo clear ;
local m = 1  ;

foreach y of varlist recid_3_dv recid_3_aslt recid_3 recid_3_dvfel { ;	
			
	eststo tab8a_`m': reghdfe `y' dv_did dv_case dv_judge $cntrls , $hdfe_opts ;

		estadd ysumm	;
		local m `++m'	;
} ;


esttab 	tab8a_* using "${OUTPUT}/tab8.rtf", append ${tab_optns} 
		scalars("ymean Y Mean") 
		keep(dv_did dv_case dv_judge)
		title( {\b Table 8. Panel B: DiD - ANY CHARGE}) ;


estimates clear ;

# d cr

********************************************************************************
*
**## (3)
*
********************************************************************************

# d ; 


eststo clear ;
local m = 1  ;

use "${DATA}/data_ARR_DV.dta", clear ;

	reghdfe rearrest_3 dv_judge $cntrls if dv_case == 1, $hdfe_opts ;

		eststo rearrest_`m', title("Re-Arrest DV") ;
		estadd ysumm 	;				
		local m `++m'	;
	
use "${DATA}/data_ARR_ASLT.dta", clear ;

	reghdfe rearrest_3 dv_judge $cntrls if dv_case == 1, $hdfe_opts ;
	
		eststo rearrest_`m', title("Re-Arrest Assault") ;
		estadd ysumm 	;				
		local m `++m' 	;
			
use "${DATA}/data_ARR_ALL.dta", clear ;
 
	reghdfe rearrest_3 dv_judge $cntrls if dv_case == 1, $hdfe_opts ;

		eststo rearrest_`m', title("Re-Arrest All") ;
		estadd ysumm 	;			
		local m `++m' 	;
	


esttab 	rearrest_* using "${OUTPUT}/tab8.rtf", append ${tab_optns} 
		scalars("ymean Y Mean") 
		keep(dv_judge)
		title( {\b Table 8. Panel A: ANY ARREST}) ;

		
# d cr

********************************************************************************
*
**## (4)
*
********************************************************************************

# d ; 

eststo clear ;
local m = 1  ;

use "${DATA}/data_ARR_DV.dta", clear ;

	reghdfe rearrest_3 dv_did dv_case dv_judge $cntrls , $hdfe_opts ;

		eststo rearrest_`m', title("Re-Arrest DV") ;
		estadd ysumm 	;		
		local m `++m' 	;
	
use "${DATA}/data_ARR_ASLT.dta", clear ;

	reghdfe rearrest_3 dv_did dv_case dv_judge $cntrls , $hdfe_opts ;
	
		eststo rearrest_`m', title("Re-Arrest Assault") ;
		estadd ysumm 	;			
		local m `++m' 	;
			
use "${DATA}/data_ARR_ALL.dta", clear ;

	reghdfe rearrest_3 dv_did dv_case dv_judge $cntrls , $hdfe_opts ;

		eststo rearrest_`m', title("Re-Arrest All") ;
		estadd ysumm 	;		
		local m `++m' 	;


esttab 	rearrest_* using "${OUTPUT}/tab8.rtf", append ${tab_optns} 
		scalars("ymean Y Mean") 
		keep(dv_did dv_case dv_judge)
		title( {\b Table 8. Panel B: DiD -- ANY ARREST}) ;
		
		
# d cr

********************************************************************************
*   End of File
********************************************************************************
